import request from "../utils/request";

// 用户登录
export const userLogin = data => {
    return request({
        method: 'POST',
        url: '/user/loginIn',
        data
    })
}
//用户注销
export const quitLogin = () => {
    return request({
        method: 'GET',
        url: '/user/loginOut'
    })
}
//修改密码
export const changePassword = data => {
    return request({
        method: 'POST',
        url: '/user/changePass',
        data
    })
}
//查看教师学生-分页
export const stuPage = data => {
    return request({
        method: 'POST',
        url: '/user/findUserPage',
        data
    })
}
//删除用户
export const delUser = userId => {
    return request({
        method: 'GET',
        url: '/user/deleteUser?userId=' + userId
    })
}
//重置用户密码
export const retPas = userId => {
    return request({
        method: 'GET',
        url: '/user/restPwdByUserId?userId=' + userId
    })
}
//编辑学生
export const editUser = data => {
    return request({
        method: 'POST',
        url: '/user/editStudent',
        data
    })
}
//新建教师账户
export const addTec = data => {
    return request({
        method: 'POST',
        url: '/user/addTeacher',
        data
    })
}
//编辑教师账户
export const editTec = data => {
    return request({
        method: 'POST',
        url: '/user/editTeacher',
        data
    })
}
